package br.ufpe.cin.msc.jrsj2.recommender.persistence.entity;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.PrimaryKeyJoinColumn;

@Entity
public class Profile {

	@Id
	private long clientId;

	@Id
	private long programId;

	@Basic
	private int rating;

	@ManyToOne
	@PrimaryKeyJoinColumn(name = "client_id", referencedColumnName = "id")
	private Client client;

	@ManyToOne
	@PrimaryKeyJoinColumn(name = "program_id", referencedColumnName = "id")
	private Program program;

	public Profile(Client client, Program program, int rating) {
		this.client = client;
		this.setProgram(program);
		this.rating = rating;
	}

	public void setClient(Client client) {
		this.client = client;
	}

	public Client getClient() {
		return client;
	}

	public void setProgram(Program program) {
		this.program = program;
	}

	public Program getProgram() {
		return program;
	}

}
